
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <set>
typedef long long ll;

const ll max_n = 1e5+5;
ll n, q, input,now;
char c;
std::set<ll> pos;

#define NV(v)#v<<" : "<<(v)

int main(){
    freopen("secret.in", "r", stdin);
    freopen("secret.out", "w", stdout);

    std::cin>>n>>q;
    for(ll _{0};_<n;_++){
        std::cin>>input;
        pos.insert(input);
    }
    for(ll _{0};_<q;_++){
        std::cin>>c>>now;

        if(c=='+'){
            pos.insert(now);
        }else if(c=='-'){
            pos.erase(now);
        }else{
            double ans = std::numeric_limits<decltype(ans)>::max();
            const auto it_right {pos.upper_bound(now)};
            if ( it_right != pos.end()){
                ans = std::min(ans, (double)std::max(*pos.rbegin()-now, *it_right - *pos.begin()) / (double)2.0 );
            }
            auto it_left {pos.find(now)};
            if(it_left!=pos.begin()){
                --it_left;
                ans = std::min(ans, (double)std::max(*pos.rbegin() - *it_left, now - *pos.begin()) / (double)2.0 );
            }
            std::cout<<std::fixed<<std::setprecision(2)<<ans<<'\n';
        }
    }
}